const fp = require("lodash/fp");
const { Maybe, Container } = require("./support");

let safeProp = fp.curry(function(x, o) {
    return Maybe.of(o[x]);
}) 

let user = {id:2, name:'albert'};
let ex3 = (obj) => {
    let str = safeProp('name', obj).map(fp.first);
    console.log(str);
}

ex3(user);